<?php $connect=  mysql_connect('localhost','root','123456');
        mysql_select_db("tkb.hus",$connect);
       mysql_query("set character_set_results='utf8'");
       session_start();
       ?>
<?php 



if(isset($_POST['submit'])){
    $errors=array();
    $required=array('username','password');
    foreach ($required as $filedname){
        if(!isset($_POST[$filedname]) || empty($_POST[$filedname])){
            $errors="Xin mời  nhập <strong> ($filedname) </strong> ";
        }
    }
}
?>
 <?php 
                    if(!empty($errors)){
                        echo "<ul>";
                        foreach ($errors as $error){
                            echo "<li>$error</li>";
                        }
                        echo "</ul>";
                    }
                    ?>